{% extends "index.html" %}

{% load item_tags %}

{% block inline_navi %}
    {% item_add_document_inline module_part module_term %}
    Link zu Lerneinheit hinzufügen
{% endblock %}

{% block box_title %}
	Link
{% endblock %}
{% block box_content %}
	<p>
	    Hier kannst du eine neue Lerneinheit in <b>{{ module_part.module.name }} {{ module_term.semester }} ({{ module_part.name }})</b> erstellen und gleich einen Link dazu hinzufügen.
	    {% document_description %}
	    {% item_description %}
	</p>
	
	<div id="detail_table">
	    <h3>Link</h3>
	    <form action="{% url link.views.add_document_link module_part.id module_term.id %}" enctype="multipart/form-data" method="post">
	        {% csrf_token %}
	        {{ document_form.non_field_errors }}
	        {{ item_form.non_field_errors }}
	        {{ link_form.non_field_errors }}
	        <table>
	        	{% document_fields document_form module_part module_term %}
	            <!-- Url -->
	            <tr>
	                <th><label for="id_url">URL*:</label></th>
	                <td>{{ link_form.url }}</td>
	            </tr>
	            <!-- Internal -->
	            <tr>
	                <th><label for="id_internal">Nur aus dem Uninetz*:</label></th>
	                <td>{{ link_form.internal }}</td>
	            </tr>
	            {% item_fields item_form module_part module_term %}
	            <tr>
	                <td colspan="2" align="center" style="padding-top: 10px;">
	                    <input type="submit" value="Hinzufügen" />
	                </td>
	            </tr>
	        </table>
	    </form>
	</div>
{% endblock %}